package com.guavamail.smtp.command.impl;

import java.io.IOException;

import org.apache.mina.core.session.IoSession;

import com.guavamail.smtp.SMTPContext;
import com.guavamail.smtp.command.AbstractCommand;

public class RSET extends AbstractCommand {
	public RSET() {
		super("RSET", "");
	}

	@Override
	public void execute(String commandString, IoSession ioSession, SMTPContext ctx) throws IOException {

		resetContext(ctx);
		sendResponse(ioSession, "250 Ok");
	}

	public static void resetContext(SMTPContext ctx) {
		ctx.getSessionStatus().reset();
	}
}
